Add -u to `cargo test`
authorAlex Crichton <alex@alexcrichton.com>
Thu, 10 Jul 2014 18:49:12 +0000 (11:49 -0700)
committerAlex Crichton <alex@alexcrichton.com>
Thu, 10 Jul 2014 18:49:12 +0000 (11:49 -0700)
src/bin/cargo-test.rs

index 2115612f1475e80477ea917c186ba6aa306ef180..1967c59fdf298c1e132b4d54f7fa87623aee2f4b 100644 (file)
@@ -22,11 +22,12 @@ use cargo::util::important_paths::find_project_manifest;
 struct Options {
     manifest_path: Option<String>,
     jobs: Option<uint>,
+    update: bool,
     rest: Vec<String>,
 }
 
 hammer_config!(Options "Run the package's test suite", |c| {
-    c.short("jobs", 'j')
+    c.short("jobs", 'j').short("update", 'u')
 })
 
 fn main() {
@@ -45,7 +46,7 @@ fn execute(options: Options, shell: &mut MultiShell) -> CliResult<Option<()>> {
     };
 
     let compile_opts = ops::CompileOptions {
-        update: false,
+        update: options.update,
         env: "test",
         shell: shell,
         jobs: options.jobs